<template>
    <div id="detail">
        <div class="content">
            <!-- <div class="user">
                                                    <div class="img"><img :src="$store.state.user.szHeadPicUrl==''?require('./../../../assets/img/nopic.png'):$store.state.user.szHeadPicUrl" alt=""></div>
                                                    <div class="nichen">{{$store.state.user.szNickName}}</div>
                                                </div> -->
            <mt-cell title="成员昵称">
                <span>{{user.userName}}</span>
                <i class="iconfont icon-dailishang" slot="icon"></i>
            </mt-cell>
            <mt-cell title="成员Id" value="">
                <span>{{user.userID}}</span>
                <i class="iconfont icon-zhanghao" slot="icon"></i>
            </mt-cell>
            <mt-cell title="钻石数量" value="123321">
                <span>{{user.nCardCount}}</span>
                <i class="iconfont icon-tuiguangma" slot="icon"></i>
            </mt-cell>
            <div class="ge"></div>
            <mt-cell title="申请时间" value="" class="nobckimg">
                <span style="">{{user.createDate}}</span>
                <i class="iconfont icon-yujing" slot="icon"></i>
            </mt-cell>
            <mt-cell title="加入时间">
                <span style="">{{user.applicationTime}}</span>
                <i class="iconfont icon-shijian" slot="icon"></i>
            </mt-cell>
            <div class="ge"></div>
            <mt-cell title="开房局数限制" value="123321" class="nobckimg" :to="`/eidtuplimit/${user.id}`" is-link>
                <span style="color: red">{{user.upperLimit}}局</span>
                <i class="iconfont icon-yueqia" slot="icon"></i>
            </mt-cell>
            <div class="ge"></div>
            <mt-cell title="赠送用户钻石" value="123321" class="nobckimg" :to="`/diamond/${user.userID}`" >
                <button class="mint-button mint-button--primary mint-button--small"><span class="mint-button-icon"><i class="mintui mintui-back"></i></span> <label class="mint-button-text">送钻</label></button>
                <i class="iconfont icon-zuanshi2 " slot="icon"></i>
            </mt-cell>
        </div>
    </div>
</template>
<script>
    import {
        MessageBox
    } from 'mint-ui'
    export default {
        name: "detail",
        data() {
            return {
                userId: 0,
                user: {}
            };
        },
        methods: {
            getInfo() {
                let getParams = {
                    params: {
                        'functionname': "QYMemberDetail",
                        body: JSON.stringify({
                            userId: this.userId
                        })
                    }
                }
                this.$http.get(`${this.baseUrl}/Main/GetData`, getParams).then(response => {
                  //  console.log(response)
                    let data = response.data;
                    if (data.code == 1) {
                        this.user = data.body;
                    } else {
                        MessageBox("提示", data.msg);
                    }
                }).catch(error => {})
            }
        },
        created() {
            let id = this.$route.params.Id;
            if (id) {
                this.userId = id;
                this.getInfo();
            }
        },
        mounted() {}
    };
</script>

<style lang="scss" scoped>
    .content {
        padding: 30px 10px 60px 10px;
    }
    .user {
        display: flex;
        padding: 10px 10px 10px 10px;
        margin-bottom: 20px;
        align-items: center;
        background: #ffffff;
        .img {
            width: 80px;
            img {
                display: block;
                width: 100%;
            }
        }
        .nichen {
            padding-left: 15px;
            flex: 1;
            color: #aca1a1;
            font-size: 16px;
        }
    }
    .ge {
        width: 100%;
        height: 25px;
        background: #eeeeee;
    }
    .noimg {}
</style>
